/*************************************************************************
	> File Name: src/Counter.java
	> Author: 
	> Mail: 
	> Created Time: 2019年09月16日 星期一 14时18分44秒
 ************************************************************************/
import java.util.Scanner;
public class Counter{
    public static void main(String []args){
        double num1, num2;
        System.out.println("Please input two double numbers:");
        Scanner scan = new Scanner(System.in);
        num1 = scan.nextDouble();
        System.out.println("The first double number is :"+num1);
        num2 = scan.nextDouble();
        System.out.println("The second double number is :"+num2);
      
        String test;
        System.out.println("pls input an operator(+-*/%):");
        test = scan.nextLine(); 
        test = scan.nextLine(); 

        if(test.equals("+")){
            System.out.println("the operator is "+ test);
            System.out.println(num1+"+"+num2+"="+add(num1,num2));
        }
        else System.out.println("test");
       // System.out.println(num1+"+"+num2+"="+(num1+num2));
       // System.out.println(num1+"-"+num2+"="+(num1-num2));
       // System.out.println(num1+"*"+num2+"="+(num1*num2));
       // System.out.println(num1+"/"+num2+"="+(num1/num2));
    }

    public double add(double num1, double num2){
       return (num1+num2); 
    }
    public double substract(double num1,double num2){
        return (num1-num2);
    }
    public double multiply(double num1,double num2){
        return (num1*num2);
    }
    public double divide(double num1,double num2){
        return (num1/num2);
    }
    public double mod(double num1,double num2){
        return (num1%num2);
    }
}


